package com.jbp.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jbp.utils.PageUtils;
import com.jbp.utils.Query;

import com.jbp.dao.RoomManagerDao;
import com.jbp.model.RoomManager;
import com.jbp.service.RoomManagerService;


@Service
public class RoomManagerServiceImpl extends ServiceImpl<RoomManagerDao, RoomManager> implements RoomManagerService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<RoomManager> page = this.page(
                new Query<RoomManager>().getPage(params),
                new QueryWrapper<RoomManager>()
        );

        return new PageUtils(page);
    }


    @Override
    public List<Integer> getUserIds(Integer roomId) {
        return baseMapper.getUserIds(roomId);
    }
}
